package com.atguigu.gmall.publisher.mapper;

import com.atguigu.gmall.publisher.beans.ProvinceStats;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Author: Felix
 * Date: 2021/8/16
 * Desc: 地区统计Mapper
 */
@Mapper
public interface ProvinceStatsMapper {
    //不同地区交易金额
    @Select("select province_id,province_name,sum(order_amount) " +
            "order_amount from province_stats_0224 where toYYYYMMDD(stt)=#{date} group by province_id,province_name")
    List <ProvinceStats> selectProvinceStats(Integer date);
}
